/*
 * @Author: peng.chen2 peng.chen2@rt-mart.com
 * @Date: 2025-07-26 10:00:00
 * @LastEditors: peng.chen2
 * @LastEditTime: 2025-08-01 09:37:41
 * @FilePath: /rt-monitoring/src/components/TableList/index.module.less
 * @Description: AlertList 组件样式文件
 */

// 导入主题变量
@success-color: #00ff88;
@warning-color: #ffaa40;
@error-color: #ff4d4f;
@info-color: #0066ff;
@primary-color: #00d4ff;
.alertListContainer {
  height: 100%;

  :global(.ant-card-body) {
    padding: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }
}

.title {
  margin: 0 !important;
  font-size: 18px;
  font-weight: 600;
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--border-primary);
  padding: 6px 0;
  .titleIcon {
    width: 4px;
    height: 16px;
    background: linear-gradient(
      to bottom,
      var(--primary-color),
      var(--primary-active)
    );
    margin-right: 10px;
    border-radius: 2px;
  }
}

.tabsSection {
  .tabLabel {
    &.active {
      color: var(--primary-color);
    }

    &.inactive {
      color: var(--text-secondary);
    }
  }
}

.tableSection {
  flex: 1;
  overflow: auto;

  :global(.ant-table) {
    height: 100%;
  }
}

.timeCell {
  font-family: 'Monaco', 'Consolas', monospace;
  color: var(--text-secondary);
  font-size: 13px;
}

.titleCell {
  font-weight: 500;
  color: var(--text-primary);
}

.notifierCell {
  color: var(--text-primary);

  .phoneIcon {
    color: var(--primary-color);
  }
}

.statusTag {
  &.connected {
    background-color: rgba(0, 255, 136, 0.1);
    border-color: var(--success-color);
    color: var(--success-color);
  }

  &.disconnected {
    background-color: rgba(255, 77, 79, 0.1);
    border-color: var(--error-color);
    color: var(--error-color);
  }
}

.levelTag {
  &.high {
    background-color: fade(@error-color, 20%);
    border-color: var(--error-color);
    color: var(--error-color);
  }

  &.medium {
    background-color: fade(@warning-color, 20%);
    border-color: var(--warning-color);
    color: var(--warning-color);
  }

  &.low {
    background-color: fade(@info-color, 20%);
    border-color: var(--info-color);
    color: var(--info-color);
  }
}

// 全局样式覆盖
:global {
  .ant-table-thead {
    position: sticky;
    top: 0;
    z-index: 100;
    font-weight: 500 !important;
  }

  .ant-table-tbody > tr > td {
    background: transparent !important;
  }

  .ant-table-tbody > tr:hover > td {
    background: var(--border-light) !important;
  }

  .table-row-even {
    background: fade(@primary-color, 2%) !important;
  }

  .ant-tabs-tab {
    color: var(--text-secondary) !important;
  }

  .ant-tabs-tab-active {
    color: var(--primary-color) !important;
  }

  .ant-tabs-ink-bar {
    background: var(--primary-color) !important;
  }

  .ant-table-container {
    border-radius: 6px !important;
  }

  .ant-table {
    background: transparent !important;
  }

  .ant-table-content {
    background: transparent !important;
  }
}
